package com.ruoyi.course.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.utils.PageUtils;
import com.ruoyi.course.domain.THomework;
import com.ruoyi.course.vo.THomeworkVo;
import com.ruoyi.course.mapper.THomeworkMapper;
import com.ruoyi.course.service.ITHomeworkService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 作业Service业务层处理
 *
 * @author ruoyi
 * @date 2024-12-03
 */
@Service
public class THomeworkServiceImpl extends ServiceImpl<THomeworkMapper, THomework> implements ITHomeworkService {

    @Override
    public TableDataInfo<THomeworkVo> queryList(THomeworkVo entity) {
        return PageUtils.buildDataInfo(this.baseMapper.queryList(PageUtils.buildPage(), entity));
    }

    @Override
    public List<THomeworkVo> queryAll(THomeworkVo entity) {
        return this.baseMapper.queryList(entity);
    }

    @Override
    public THomeworkVo queryById(Long id) {
        return this.baseMapper.queryById(id);
    }
}
